package com.blockchainenergy.info.node;

import com.blockchainenergy.common.CarbonTools;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class Node {
    private Integer i;
    private Integer light;
    private Integer color;
    private Double e;// 碳势
    private Double inFlow;
    private Double outFlow;

    public Node(Integer i) throws Exception {
        this.i = i;
        this.light = CarbonTools.rrank(i);
        this.color = CarbonTools.erank(i);
        this.e = CarbonTools.currente(i);
        this.inFlow = CarbonTools.inflow(i)[7];
        this.outFlow = CarbonTools.outflow(i)[7];
    }
}
